import { createWebHashHistory, createRouter } from "vue-router";

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    redirect: "/home/male",
    component: () => import("../pages/Home.vue"),
    children: [
      {
        path: "/home/male",
        component: () => import("../components/common/Male.vue"),
      },
      {
        path: "/home/female",
        component: () => import("../components/common/Female.vue"),
      },
      {
        path: "/home/search",
        component: () => import("../pages/Search.vue"),
      },
    ],
  },
  {
    path: "/login",
    component: () => import("../pages/Login.vue"),
  },
  {
    path: "/register",
    component: () => import("../pages/Register.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
